#####################################################################
# Product:      KnowledgeEngine (Plone Edition)
#
# File:         EventReflection.py
#
# Copyright:    Copyright (c) 2004, Faulkner Technologies
#
# Author:       Brian Oliver
#
# Description:  Defines the EventReflection interface, which
#               specifies how EventDefinitions may be requested
#               at runtime.
#
# See Also:     EventDefinition
#####################################################################

#####################################################################
## KnowledgeEngine Library Imports
# (none)

#####################################################################
## Zope Library Imports
# (none)
 
#####################################################################
## Python Library Imports
# (none)

#####################################################################
## PropertyReflection Interface Definition
class EventReflection:
    """
        An interface specifying how EventDefinitions are 
        requested.
    """
        
    #---------------------------------------------------------------#

    def hasEvents(self):
        """
            ABSTRACT: Return if the defining class exposes events
            that may be handled by actions
        """
        
        return 0
        
    #---------------------------------------------------------------#
        
    def isEventDefined(self, eventIdentity):
        """
            ABSTRACT: Return if the specified event is defined 
            by the class implementing this interface. 

            RETURN TYPE: Boolean
        """

        return 0
        
    #---------------------------------------------------------------#
        
    def getEventDefinition(self, eventIdentity):
        """
            ABSTRACT: Return the EventDefinition for the specified
            event identity. Returns None if the event definition
            is unknown

            RETURN TYPE: EventDefinition
        """

        return None
        
    #---------------------------------------------------------------#
        
    def getEventDefinitions(self):
        """
            ABSTRACT: Return the EventDefinitions for the
            class implementing this interface

            RETURN TYPE: [EventDefinition]
        """

        return []
        
    #---------------------------------------------------------------#
        
    def addEventDefinition(self, eventDefinition):
        """
            Adds/overrides the specified event definition to/in
            the class implementing this interface
        """

        pass
        
    #---------------------------------------------------------------#

#####################################################################
## Class Initialisation
# (none)
